package com.juzipi.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.juzipi.demo.mapper.PeopleMapper;
import com.juzipi.demo.pojo.People;
import com.juzipi.demo.service.PeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author juzipi
 * @Date 2021/4/25 13:51
 * @Info sevice 实现层
 */
@Service
public class PeopleServiceImpl extends ServiceImpl<PeopleMapper,People> implements PeopleService {


    @Autowired
    private PeopleMapper peopleMapper;

    @Override
    public List<People> queryAllPeople() {
        List<People> people = peopleMapper.queryAllPeople();
        System.out.println(peopleMapper.selectList(null));
        return people;
    }


    @Override
    public People queryPeopleById(Long id) {
        return peopleMapper.queryPeopleById(id);
    }

    @Override
    public Integer createPeople(People people) {
        return peopleMapper.createPeople(people);
    }

    @Override
    public Integer modifyPeople(People people) {
        return peopleMapper.modifyPeople(people);
    }

    @Override
    public Integer removePeopleById(Long id) {
        return peopleMapper.removePeopleById(id);
    }

}
